/**
  ******************************************************************************
  * @file           : RGB.h
  * @author         : admin
  * @brief          : None
  * @attention      : None
  * @date           : 2024/10/12
  ******************************************************************************
  */

#ifndef RGB_H
#define RGB_H
#include <Arduino.h>
#include <DFRobot_NeoPixel.h>
class RGB
{
public:
    RGB();
    void write(int8_t index, uint8_t r, uint8_t g, uint8_t b);
    void write(int8_t index, uint32_t color){write(index, 0xff&(color>>16), 0xff&(color>>8), 0xff&color);}
    void brightness(uint8_t b);
    uint8_t brightness();
private:
    int _brightness;
    uint32_t c[3];
};
extern DFRobot_NeoPixel pixels;
extern RGB rgb;
#endif //XYXKC_ESP32_E_RGB_H
